const { defineConfig } = require('@vue/cli-service')

module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    port: 8081,
    proxy: {
      '/api': {
        target: 'http://localhost:8080',
        changeOrigin: true,
        onProxyReq: function(proxyReq) {
          // 删除可能导致问题的请求头
          proxyReq.removeHeader('Origin');
          proxyReq.removeHeader('Referer');
        }
      }
    }
  },
  configureWebpack: {
    resolve: {
      alias: {
        '@': require('path').join(__dirname, 'src')
      }
    }
  },
  lintOnSave: false
}) 